<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/jquery-3.4.1.js"></script>
    <script src="../../js/map.js"></script>
<script>
$(document).ready(function(){
       /* $("p").click(function(){
            $(this).hide();
        });*/
     $("p").click(function () {
         testMap1()
     });

    function testMap1(){
        var m = new Map();
        m.put('key1','Comtop');
        m.put('key2','南方电网');
        m.put('key3','景新花园');
        console.log("init:"+m);

        m.put('key1','康拓普');
        console.log("set key1:"+m);

        m.remove("key2");
        console.log("remove key2: "+m);

        var s ="";
        m.each(function(key,value,index){
            s += index+":"+ key+"="+value+"/n";
        });
        console.log(s);
    }
});
</script>


</head>
<body>
    <p>如果你点我，我就会消失。</p>
    <p>继续点我!</p>
    <p>接着点我!</p>
</body>
</html>